<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width:100px;
            height:100px;
            background-color: red;
            /*设置圆角边框*/
            /*border-radius: 50%;*/
            /*应用动画*/
            /*设置动画*/
            animation-name: move;
            /*持续时间*/
            animation-duration: 2s;
            /*速度曲线*/
            animation-timing-function: linear;
            /*infinite 无限次执行*/
            animation-iteration-count: infinite;
            /*alternate反向执行 normal通常*/
            animation-direction: alternate;
        }
        /*定义动画关键帧*/
        @keyframes move{
        /*只需要开始和结束 from开始 to结束*/
        /*需要中间过程 0%开始 10% 25% 50% 75% 100%结束*/
        /*from{

            transform: translateX(0px);
        }
        to{
            transform: translateX(200px);
        }
        }*/
        0%{
            /*形变 平移 旋转*/
            transform: translateX(0px) rotate(0deg);
        }
        25%{
            transform: translateX(50px) rotate(90deg);
            background-color: pink;
            border-radius: 10px;
        }
        50%{
            transform: translateX(100px) rotate(180deg);
            background-color: orange;
            border-radius: 28px;
        }
        75%{
            transform: translateX(150px) rotate(270deg);
            background-color: cyan;
            border-radius:35px ;
        }
        100%{
            transform: translateX(200px) rotate(360deg);
            background-color:red;
            border-radius: 50px;
        }
    }
       @keyframes scale{
    from{
        transform:scale(0);
        }
    to{
        /*大于1放大 小于1缩小*/
        transform:scale(1.2);
    }
}
    img{
        margin-top: 20px;
        animation: scale .2s linear infinite alternate;
    }

    </style>
</head>
<body>
    <div></div>
    <img width="150px" src="../音视频/1.webp"alt="">
</body>
</html>